
package finalproject.server;

import java.util.ArrayList;
import java.util.List;

import finalproject.client.ProjectService;
import finalproject.shared.Docent;
import finalproject.shared.Student;
import finalproject.shared.Vak;
import finalproject.shared.Absentie;



import com.google.gwt.user.server.rpc.RemoteServiceServlet;


public class ProjectServiceImpl extends RemoteServiceServlet implements ProjectService {
    private static final long serialVersionUID = 1L;
    private DocentDAO docentDAO = new DocentDAOPmf();
    private StudentDAO studentDAO = new StudentDAOPmf();
    private VakDAO vakDAO = new VakDAOPmf();
    private AbsentieDAO absentieDAO = new AbsentieDAOPmf();
    
   
    public void addDocent(Docent docent) {
        docentDAO.addDocent(docent);
    }

  
    public List<Docent> listDocenten() {
        List<Docent> listDocenten = docentDAO.listDocenten();
        return new ArrayList<Docent> (listDocenten);
    }

   
    public void removeDocent(Docent docent) {
        docentDAO.removeDocent(docent);
    }

   
    public void updateDocent(Docent docent) {
        docentDAO.updateDocent(docent);
    }


    public void addStudent(Student student) {
        studentDAO.addStudent(student);
    }

    
    public List<Student> listStudenten() {
        List<Student> listStudenten = studentDAO.listStudenten();
        return new ArrayList<Student> (listStudenten);
    }

   
    public void removeStudent(Student student) {
        studentDAO.removeStudent(student);
    }

   
    public void updateStudent(Student student) {
        studentDAO.updateStudent(student);
    }

   
    public void addVak(Vak vak) {
        vakDAO.addVak(vak);
    }

   
    public List<Vak> listVakken() {
        List<Vak> listVakken = vakDAO.listVakken();
        return new ArrayList<Vak> (listVakken);
    }

   
    public void removeVak(Vak vak) {
        vakDAO.removeVak(vak);
    }

   
    public void updateVak(Vak vak) {
        vakDAO.updateVak(vak);
    }
 
    
    public List<Absentie> listAbsenties() {
        List<Absentie> listAbsenties = absentieDAO.listAbsenties();
        return new ArrayList<Absentie> (listAbsenties);
    }   
    
    
    public void addAbsentie(Absentie absentie){
    	absentieDAO.addAbsentie(absentie);
    }
    
    
    public void removeAbsentie(Absentie absentie){
    	absentieDAO.addAbsentie(absentie);
    }
    
    
    public void updateAbsentie(Absentie absentie){
    	absentieDAO.updateAbsentie(absentie);
    }

	  

}
